<?php
$id=$_GET["id"];
$list=$_GET["list"];
$total=$_GET["total"];
$location=$_GET["location"];
$con = mysql_connect("localhost","root","1234");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("mobile", $con);

mysql_query("INSERT INTO purchase (userid, itemlist ,totalprice,location) VALUES ('$id', '$list' , '$total','$location')");

mysql_close($con);
?>